import request from '@/utils/request'
import { transFormValue } from '@/utils/tools'

//楼盘列表
export function communityGetList(data) {
    return request({
      url: '/community/getList' + transFormValue(data),
      method: 'post'
    })
}

//新增楼盘
export function communityCreate(data) {
  return request({
    url: '/community/create' + transFormValue(data),
    method: 'post'
  })
}

//编辑楼盘
export function communityUpdate(data) {
  return request({
    url: '/community/update' + transFormValue(data),
    method: 'post'
  })
}


//楼盘异步导入
export function communityAsyncImportZip(data) {
    return request({
      url: '/community/asyncImportZip' + transFormValue(data),
      method: 'post'
    })
}

//楼盘删除
export function communityDelete(data) {
    return request({
      url: '/community/delete' + transFormValue(data),
      method: 'post'
    })
}


//楼盘获取导出可选字段
export function communityGetExportFieldOptions() {
    return request({
      url: '/community/getExportFieldOptions',
      method: 'post'
    })
}

//楼盘详情
export function communityInfo(data) {
  return request({
    url: '/community/info'+ transFormValue(data),
    method: 'post'
  })
}


//楼盘坐标
export function communityGetCollection(data) {
  return request({
    url: '/community/getCollection'+ transFormValue(data),
    method: 'post'
  })
}
